<%@ include file="/platform/common/head.jsp" %>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<html>
<style>
   span{ text-align: left !important;}
    .match-div span{display: block}
    span.ui-select-match-item span img{float: left}
    span.ui-select-match-item span{}
    .ui-select-match-item span.ng-binding{ float: left; overflow: hidden; width: 80%;white-space:nowrap;text-overflow:ellipsis;}
    
    div[upload-file-simplify]{
        height: 43px;
    }
    
    .pt-dictionary{
        height: 43px;
    }
    
    #btn_upload_upload{
        vertical-align: middle;   
    }
    
    .pt-dictionary .multiple-select.ui-select-container{
	    border-bottom: none;
	}
	
	.match-div span{
	    display: inline-block;
	}
	
	relevance ui li{
	    border: 1px solid #ccc;
	}
	.ui-select-match-item span.ng-binding{
       padding-left: 5px;
	   width: auto;
	}
	.ui-select-match-item span.ng-binding{
	   width: auto;
	   
	}
	.ui-select-multiple.ui-select-bootstrap .ui-select-match-item{
	   border: 1px solid #ccc;
       padding: 5px;
       margin: 0;
	}
	.ui-select-multiple.ui-select-bootstrap .ui-select-match-item:active{
	   box-shadow: none;
	}
</style>
<body ng-init="YWID='${param.businessId}';LXDM='${param.lxdm}';ZLXDM='${param.zlxdm}';readOnly='${param.readOnly}'">
<div ng-app="myApp" ng-init="" ng-controller="loadFileController">
    <div upload-file-simplify ng-config="uploadConfig"
         ng-uploader="uploader" select-tip="请选择文件"></div>
</div>
</body>
<script>
    var app = Common.initApp(['ngAnimate', 'angularFileUpload', 'ng-slide-down']);
    Common.initDirective(app);
    File.init(app);
    app.controller('loadFileController', [
        '$scope', '$http', '$templateCache', 'FileUploader', '$timeout',
        function ($scope, $http, $templateCache, FileUploader, $timeout) {

            /**
             * 文件上传组件配置
             */
            $scope.uploader = {};
            $scope.uploadConfig = {
                uploadId: 'upload', // 组件ID
                LTBH: 'jgjc', // 系统编号
                LXDMS: $scope.LXDM, // 附件类型代码
                ZLXDMS: $scope.ZLXDM, //附件子类型代码
                YWSJID: $scope.YWID,
                multiple: false,
                readOnly: $scope.readOnly == 'true',
                buttonConfig: {
                    hideUploadBtn: $scope.readOnly == 'true',
                    hideDeleteBtn: $scope.readOnly == 'true'
                },
                callback: {//可选，按钮的回调事件对象
                    // 点击文件删除按钮回调函数，参数(当前文件对象)
                    afterDeleteFileItem: function (item) {

                    }
                },
                // 上传过程中的各阶段的回调函数配置
                uploaderCallback: {
                    // 文件上传成功事件的回调函数,参数(文件对象, 返回值, 状态, 请求头)
                    onSuccessItem: function (item) {
                        if (item.file.name && item.file.name != '') {

                        }
                    },
                    // 全部上传完成事件的回调函数
                    onCompleteAll: function () {

                    }
                }
            }
        }
    ]);

    $(function () {
        $('div.pt-dictionary>div>div:first').addClass('match-div');
    });
</script>
</html>
